<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>React 类式组件</title>
</head>
<body>

<div id="test"></div>

<script src="js/react.development.js" crossorigin></script>
<script src="js/react-dom.development.js" crossorigin></script>
<script src="js/babel.js"></script>
<script type="text/babel">
    //1.创建类式组件
    class ClassComponent extends React.Component {
        render() {
            return (
                <div>
                    <h2>类式组件（适用于复杂定义）</h2>
                    <button type="button">按钮点击</button>
                </div>
            );
        }
    }

    //2.渲染组件到页面
    ReactDOM.render(<ClassComponent/>, document.getElementById("test"));
</script>
</body>
</html>